// $_FILEHEADER_BEGIN ***************************
// 版权声明:北京畅聊天下科技有限公司版权所有
// Copyright © 2012 - Changliao Technology Co.Ltd. All Rights Reserved
// 文件名称: BarrageItem.h
// 创建日期: 16/1/24
// 创 建 人: 甄鑫
// 文件说明: <#content#>
// $_FILEHEADER_END ******************************


#import <Foundation/Foundation.h>

@protocol BarrageItemModelProtocol <NSObject>

- (NSAttributedString *)content;
- (void)setContent:(NSAttributedString *)content;

- (NSURL *)imageUrl;
- (void)setImageUrl:(NSURL *)url;

- (CGFloat)playTime;
- (void)setPlayTime:(CGFloat)playTime;

- (Class)viewClass;
@end

@protocol BarrageItemViewProtocol <NSObject>
+ (UIView <BarrageItemViewProtocol> *)create;

- (id<BarrageItemModelProtocol>)itemModel;
- (void)setItemModel:(id<BarrageItemModelProtocol>)itemModel;

- (CGFloat)playTime;
- (void)setPlayTime:(CGFloat)playTime;

@end


@interface BarrageItemModel : NSObject <BarrageItemModelProtocol>
@property (nonatomic, copy) NSString * contentStr;
@property (nonatomic, copy) NSString *uid;
@property (nonatomic, assign) CGFloat playTime;
@property (nonatomic, assign) BOOL isShowRedSpecial;
@property (nonatomic, copy) NSString *redSpecialContent;
@end

@interface BarrageItemView : UIView <BarrageItemViewProtocol>
@property (nonatomic, assign) CGFloat playTime;
@property (nonatomic, strong) BarrageItemModel * itemModel;

@end

@interface BarrageItemRedSepecialView : UIView
+ (BarrageItemRedSepecialView *)createWithContent:(NSString *)content;
@end